import { nFormatter } from '@/utils/nFormatter'

export default {
  chart: {
    type: 'bullet',
    inverted: true
  },
  tooltip: {
    formatter: function() {
      const { point, key } = this
      return `环比下降总数:${point.target}<br/>${key}环比下降总数:${point.y}`
    }
  },
  xAxis: {
    lineColor: '#41537d',
    labels: {
      style: {
        color: '#fff'
      },
      format: '{value}'
    }
  },
  yAxis: {
    gridLineWidth: 0,
    title: null,
    labels: {
      style: {
        color: '#fff'
      },
      formatter: function(val = {}) {
        const { value } = val
        return nFormatter(value)
      }
    }
  },
  plotOptions: {
    series: {
      pointPadding: 0.25,
      borderWidth: 0,
      targetOptions: {
        width: '200%',
        color: '#32e06f'
      }
    }
  },
  credits: {
    enabled: false
  },
  exporting: {
    enabled: false
  },
  series: [{}]
}
